# package containing hybrid encryption internal implementations of PQC primitives

package(default_visibility = ["//:__subpackages__"])

licenses(["notice"])

cc_library(
    name = "cecpq2_aead_hkdf_hybrid_decrypt",
    srcs = ["cecpq2_aead_hkdf_hybrid_decrypt.cc"],
    hdrs = ["cecpq2_aead_hkdf_hybrid_decrypt.h"],
    deps = [
        "@boringssl//:crypto",
        "@com_google_absl//absl/status",
        "@com_google_absl//absl/strings",
        "@tink_cc//:hybrid_decrypt",
        "@tink_cc//experimental/pqcrypto/cecpq2/hybrid:cecpq2_aead_hkdf_dem_helper",
        "@tink_cc//experimental/pqcrypto/cecpq2/subtle:cecpq2_hkdf_recipient_kem_boringssl",
        "@tink_cc//experimental/pqcrypto/cecpq2/subtle:cecpq2_subtle_boringssl_util",
        "@tink_cc//experimental/pqcrypto/proto:cecpq2_aead_hkdf_cc_proto",
        "@tink_cc//subtle:ec_util",
        "@tink_cc//util:enums",
        "@tink_cc//util:secret_data",
        "@tink_cc//util:status",
        "@tink_cc//util:statusor",
    ],
)

cc_library(
    name = "cecpq2_aead_hkdf_hybrid_encrypt",
    srcs = ["cecpq2_aead_hkdf_hybrid_encrypt.cc"],
    hdrs = ["cecpq2_aead_hkdf_hybrid_encrypt.h"],
    deps = [
        "@com_google_absl//absl/status",
        "@com_google_absl//absl/strings",
        "@tink_cc//:aead",
        "@tink_cc//:hybrid_encrypt",
        "@tink_cc//experimental/pqcrypto/cecpq2/hybrid:cecpq2_aead_hkdf_dem_helper",
        "@tink_cc//experimental/pqcrypto/cecpq2/subtle:cecpq2_hkdf_sender_kem_boringssl",
        "@tink_cc//experimental/pqcrypto/cecpq2/subtle:cecpq2_subtle_boringssl_util",
        "@tink_cc//experimental/pqcrypto/proto:cecpq2_aead_hkdf_cc_proto",
        "@tink_cc//util:enums",
        "@tink_cc//util:status",
        "@tink_cc//util:statusor",
    ],
)

# tests

cc_test(
    name = "cecpq2_aead_hkdf_hybrid_encrypt_test",
    size = "small",
    srcs = ["cecpq2_aead_hkdf_hybrid_encrypt_test.cc"],
    copts = ["-Iexternal/gtest/include"],
    deps = [
        ":cecpq2_aead_hkdf_hybrid_encrypt",
        "@boringssl//:crypto",
        "@com_google_absl//absl/status",
        "@com_google_googletest//:gtest_main",
        "@tink_cc//:hybrid_encrypt",
        "@tink_cc//aead:aes_gcm_key_manager",
        "@tink_cc//experimental/pqcrypto/cecpq2/subtle:cecpq2_subtle_boringssl_util",
        "@tink_cc//experimental/pqcrypto/cecpq2/util:test_util",
        "@tink_cc//subtle:random",
        "@tink_cc//subtle:subtle_util",
        "@tink_cc//util:enums",
        "@tink_cc//util:statusor",
        "@tink_cc//util:test_matchers",
        "@tink_cc//util:test_util",
    ],
)

cc_test(
    name = "cecpq2_aead_hkdf_hybrid_decrypt_test",
    size = "small",
    srcs = ["cecpq2_aead_hkdf_hybrid_decrypt_test.cc"],
    copts = ["-Iexternal/gtest/include"],
    deps = [
        ":cecpq2_aead_hkdf_hybrid_decrypt",
        ":cecpq2_aead_hkdf_hybrid_encrypt",
        "@boringssl//:crypto",
        "@com_google_absl//absl/status",
        "@com_google_googletest//:gtest_main",
        "@tink_cc//:hybrid_encrypt",
        "@tink_cc//aead:aes_ctr_hmac_aead_key_manager",
        "@tink_cc//aead:aes_gcm_key_manager",
        "@tink_cc//aead:xchacha20_poly1305_key_manager",
        "@tink_cc//config:tink_config",
        "@tink_cc//experimental/pqcrypto/cecpq2/subtle:cecpq2_subtle_boringssl_util",
        "@tink_cc//experimental/pqcrypto/cecpq2/util:test_util",
        "@tink_cc//experimental/pqcrypto/proto:cecpq2_aead_hkdf_cc_proto",
        "@tink_cc//subtle:random",
        "@tink_cc//subtle:subtle_util",
        "@tink_cc//util:enums",
        "@tink_cc//util:statusor",
        "@tink_cc//util:test_matchers",
        "@tink_cc//util:test_util",
    ],
)
